#include "FPSMeasure.h"

FPSMeasure::FPSMeasure(void)
{
}

FPSMeasure::~FPSMeasure(void)
{
}

void FPSMeasure::Initialize()
{
	m_fps = 0;
	m_count = 0;
	m_startTime = timeGetTime();
}

void FPSMeasure::Frame()
{
	m_count++;

	if(timeGetTime() >= (m_startTime + 1000))
	{
		m_fps = m_count;
		m_count = 0;
		
		m_startTime = timeGetTime();
	}
}

int FPSMeasure::GetFps()
{
	return m_fps;
}


